package cn.z2huo.datastructure.tree.node;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>二叉树节点
 * <p>有三个属性：
 * <p>
 * 数据域、左指针指针、右节点指针
 *
 * @author z2huo
 */
@Data
@Accessors(chain = true)
public class Node<T> {

    private T data;

    private Node<T> left;

    private Node<T> right;

    public Node() {
    }

    public Node(T data) {
        this(data, null, null);
    }

    public Node(T data, Node<T> left, Node<T> right) {
        this.data = data;
        this.left = left;
        this.right = right;
    }

}
